/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Topology.impl;

import EA_Model.IEC61970.Contingency.ContingencyPackage;

import EA_Model.IEC61970.Contingency.impl.ContingencyPackageImpl;

import EA_Model.IEC61970.ControlArea.ControlAreaPackage;

import EA_Model.IEC61970.ControlArea.impl.ControlAreaPackageImpl;

import EA_Model.IEC61970.Core.CorePackage;

import EA_Model.IEC61970.Core.impl.CorePackageImpl;

import EA_Model.IEC61970.Domain.DomainPackage;

import EA_Model.IEC61970.Domain.impl.DomainPackageImpl;

import EA_Model.IEC61970.Equivalents.EquivalentsPackage;

import EA_Model.IEC61970.Equivalents.impl.EquivalentsPackageImpl;

import EA_Model.IEC61970.Generation.GenerationDynamics.GenerationDynamicsPackage;

import EA_Model.IEC61970.Generation.GenerationDynamics.impl.GenerationDynamicsPackageImpl;

import EA_Model.IEC61970.Generation.Production.ProductionPackage;

import EA_Model.IEC61970.Generation.Production.impl.ProductionPackageImpl;

import EA_Model.IEC61970.IEC61970Package;

import EA_Model.IEC61970.Informative.InfCore.InfCorePackage;

import EA_Model.IEC61970.Informative.InfCore.impl.InfCorePackageImpl;

import EA_Model.IEC61970.LoadModel.LoadModelPackage;

import EA_Model.IEC61970.LoadModel.impl.LoadModelPackageImpl;

import EA_Model.IEC61970.Meas.MeasPackage;

import EA_Model.IEC61970.Meas.impl.MeasPackageImpl;

import EA_Model.IEC61970.OperationalLimits.OperationalLimitsPackage;

import EA_Model.IEC61970.OperationalLimits.impl.OperationalLimitsPackageImpl;

import EA_Model.IEC61970.Outage.OutagePackage;

import EA_Model.IEC61970.Outage.impl.OutagePackageImpl;

import EA_Model.IEC61970.Protection.ProtectionPackage;

import EA_Model.IEC61970.Protection.impl.ProtectionPackageImpl;

import EA_Model.IEC61970.SCADA.SCADAPackage;

import EA_Model.IEC61970.SCADA.impl.SCADAPackageImpl;

import EA_Model.IEC61970.StateVariables.StateVariablesPackage;

import EA_Model.IEC61970.StateVariables.impl.StateVariablesPackageImpl;

import EA_Model.IEC61970.Topology.BusNameMarker;
import EA_Model.IEC61970.Topology.ConnectivityNode;
import EA_Model.IEC61970.Topology.TopologicalIsland;
import EA_Model.IEC61970.Topology.TopologicalNode;
import EA_Model.IEC61970.Topology.TopologyFactory;
import EA_Model.IEC61970.Topology.TopologyPackage;

import EA_Model.IEC61970.Wires.WiresPackage;

import EA_Model.IEC61970.Wires.impl.WiresPackageImpl;

import EA_Model.IEC61970.impl.IEC61970PackageImpl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class TopologyPackageImpl extends EPackageImpl implements TopologyPackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass connectivityNodeEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass topologicalNodeEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass busNameMarkerEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass topologicalIslandEClass = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see EA_Model.IEC61970.Topology.TopologyPackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private TopologyPackageImpl() {
		super(eNS_URI, TopologyFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
	 * 
	 * <p>This method is used to initialize {@link TopologyPackage#eINSTANCE} when that field is accessed.
	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static TopologyPackage init() {
		if (isInited) return (TopologyPackage)EPackage.Registry.INSTANCE.getEPackage(TopologyPackage.eNS_URI);

		// Obtain or create and register package
		TopologyPackageImpl theTopologyPackage = (TopologyPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TopologyPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TopologyPackageImpl());

		isInited = true;

		// Obtain or create and register interdependencies
		IEC61970PackageImpl theIEC61970Package = (IEC61970PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(IEC61970Package.eNS_URI) instanceof IEC61970PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(IEC61970Package.eNS_URI) : IEC61970Package.eINSTANCE);
		DomainPackageImpl theDomainPackage = (DomainPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(DomainPackage.eNS_URI) instanceof DomainPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(DomainPackage.eNS_URI) : DomainPackage.eINSTANCE);
		InfCorePackageImpl theInfCorePackage = (InfCorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InfCorePackage.eNS_URI) instanceof InfCorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InfCorePackage.eNS_URI) : InfCorePackage.eINSTANCE);
		CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI) : CorePackage.eINSTANCE);
		OperationalLimitsPackageImpl theOperationalLimitsPackage = (OperationalLimitsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(OperationalLimitsPackage.eNS_URI) instanceof OperationalLimitsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(OperationalLimitsPackage.eNS_URI) : OperationalLimitsPackage.eINSTANCE);
		WiresPackageImpl theWiresPackage = (WiresPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WiresPackage.eNS_URI) instanceof WiresPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(WiresPackage.eNS_URI) : WiresPackage.eINSTANCE);
		LoadModelPackageImpl theLoadModelPackage = (LoadModelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LoadModelPackage.eNS_URI) instanceof LoadModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LoadModelPackage.eNS_URI) : LoadModelPackage.eINSTANCE);
		GenerationDynamicsPackageImpl theGenerationDynamicsPackage = (GenerationDynamicsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(GenerationDynamicsPackage.eNS_URI) instanceof GenerationDynamicsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GenerationDynamicsPackage.eNS_URI) : GenerationDynamicsPackage.eINSTANCE);
		ProductionPackageImpl theProductionPackage = (ProductionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ProductionPackage.eNS_URI) instanceof ProductionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ProductionPackage.eNS_URI) : ProductionPackage.eINSTANCE);
		OutagePackageImpl theOutagePackage = (OutagePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(OutagePackage.eNS_URI) instanceof OutagePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(OutagePackage.eNS_URI) : OutagePackage.eINSTANCE);
		ProtectionPackageImpl theProtectionPackage = (ProtectionPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ProtectionPackage.eNS_URI) instanceof ProtectionPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ProtectionPackage.eNS_URI) : ProtectionPackage.eINSTANCE);
		EquivalentsPackageImpl theEquivalentsPackage = (EquivalentsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EquivalentsPackage.eNS_URI) instanceof EquivalentsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EquivalentsPackage.eNS_URI) : EquivalentsPackage.eINSTANCE);
		MeasPackageImpl theMeasPackage = (MeasPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(MeasPackage.eNS_URI) instanceof MeasPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(MeasPackage.eNS_URI) : MeasPackage.eINSTANCE);
		SCADAPackageImpl theSCADAPackage = (SCADAPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SCADAPackage.eNS_URI) instanceof SCADAPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SCADAPackage.eNS_URI) : SCADAPackage.eINSTANCE);
		ControlAreaPackageImpl theControlAreaPackage = (ControlAreaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ControlAreaPackage.eNS_URI) instanceof ControlAreaPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ControlAreaPackage.eNS_URI) : ControlAreaPackage.eINSTANCE);
		ContingencyPackageImpl theContingencyPackage = (ContingencyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContingencyPackage.eNS_URI) instanceof ContingencyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContingencyPackage.eNS_URI) : ContingencyPackage.eINSTANCE);
		StateVariablesPackageImpl theStateVariablesPackage = (StateVariablesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(StateVariablesPackage.eNS_URI) instanceof StateVariablesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StateVariablesPackage.eNS_URI) : StateVariablesPackage.eINSTANCE);

		// Create package meta-data objects
		theTopologyPackage.createPackageContents();
		theIEC61970Package.createPackageContents();
		theDomainPackage.createPackageContents();
		theInfCorePackage.createPackageContents();
		theCorePackage.createPackageContents();
		theOperationalLimitsPackage.createPackageContents();
		theWiresPackage.createPackageContents();
		theLoadModelPackage.createPackageContents();
		theGenerationDynamicsPackage.createPackageContents();
		theProductionPackage.createPackageContents();
		theOutagePackage.createPackageContents();
		theProtectionPackage.createPackageContents();
		theEquivalentsPackage.createPackageContents();
		theMeasPackage.createPackageContents();
		theSCADAPackage.createPackageContents();
		theControlAreaPackage.createPackageContents();
		theContingencyPackage.createPackageContents();
		theStateVariablesPackage.createPackageContents();

		// Initialize created meta-data
		theTopologyPackage.initializePackageContents();
		theIEC61970Package.initializePackageContents();
		theDomainPackage.initializePackageContents();
		theInfCorePackage.initializePackageContents();
		theCorePackage.initializePackageContents();
		theOperationalLimitsPackage.initializePackageContents();
		theWiresPackage.initializePackageContents();
		theLoadModelPackage.initializePackageContents();
		theGenerationDynamicsPackage.initializePackageContents();
		theProductionPackage.initializePackageContents();
		theOutagePackage.initializePackageContents();
		theProtectionPackage.initializePackageContents();
		theEquivalentsPackage.initializePackageContents();
		theMeasPackage.initializePackageContents();
		theSCADAPackage.initializePackageContents();
		theControlAreaPackage.initializePackageContents();
		theContingencyPackage.initializePackageContents();
		theStateVariablesPackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theTopologyPackage.freeze();

  
		// Update the registry and return the package
		EPackage.Registry.INSTANCE.put(TopologyPackage.eNS_URI, theTopologyPackage);
		return theTopologyPackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getConnectivityNode() {
		return connectivityNodeEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getTopologicalNode() {
		return topologicalNodeEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getBusNameMarker() {
		return busNameMarkerEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getTopologicalIsland() {
		return topologicalIslandEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TopologyFactory getTopologyFactory() {
		return (TopologyFactory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		connectivityNodeEClass = createEClass(CONNECTIVITY_NODE);

		topologicalNodeEClass = createEClass(TOPOLOGICAL_NODE);

		busNameMarkerEClass = createEClass(BUS_NAME_MARKER);

		topologicalIslandEClass = createEClass(TOPOLOGICAL_ISLAND);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Obtain other dependent packages
		CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes
		connectivityNodeEClass.getESuperTypes().add(theCorePackage.getIdentifiedObject());
		topologicalNodeEClass.getESuperTypes().add(theCorePackage.getIdentifiedObject());
		busNameMarkerEClass.getESuperTypes().add(theCorePackage.getIdentifiedObject());
		topologicalIslandEClass.getESuperTypes().add(theCorePackage.getIdentifiedObject());

		// Initialize classes and features; add operations and parameters
		initEClass(connectivityNodeEClass, ConnectivityNode.class, "ConnectivityNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(topologicalNodeEClass, TopologicalNode.class, "TopologicalNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(busNameMarkerEClass, BusNameMarker.class, "BusNameMarker", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(topologicalIslandEClass, TopologicalIsland.class, "TopologicalIsland", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
	}

} //TopologyPackageImpl
